<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cherry.js</title>
    <script src="../../Cherry.js"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    new CherryMain({
        app:"app",
        child:[
            new CHE_ImageMode({
                name:"image",
                height:150,
                width:150,
                full:[50,50],
                repeat:"none", //xy x y
                xy:[],
                src:"../../icon.png"
            }),
            new CHE_Container({
                height: 20
            }),
            new CHE_Button({
                margin:5,
                text:"修改地址setSrc(src)",
                methods:{
                    click:()=>{
                        $GET("#image").setSrc("https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1393700821,2679974488&fm=26&gp=0.jpg")
                    }
                }
            }),
            new CHE_Button({
                margin:5,
                text:"修改大小setFull(full)",
                methods:{
                    click:()=>{
                        $GET("#image").setFull(true)
                    }
                }
            }),
            new CHE_Button({
                margin:5,
                text:"修改铺满setRepeat(repeat)",
                methods:{
                    click:()=>{
                        $GET("#image").setRepeat("xy")
                    }
                }
            }),
            new CHE_Button({
                margin:5,
                text:"修改偏差setXY(xy)",
                methods:{
                    click:()=>{
                        $GET("#image").setXY([10,30])
                    }
                }
            }),
        ],
        Created:()=>{

        }
    });



</script>
</html>